home *** CD-ROM | disk | FTP | other *** search
- Path: newsfeeds.ans.net!btco!newsadm
- From: Shalom Reich <sqr1874@acf4.nyu.edu>
- Newsgroups: comp.lang.c++
- Subject: Re: Proper use of friend keyword
- Date: Mon, 01 Apr 1996 10:49:08 -0500
- Organization: Bankers Trust Company
- Message-ID: <315FFAF4.667B@acf4.nyu.edu>
- References: <4jn3qk$3tl6@holly.ACNS.ColoState.EDU>
- NNTP-Posting-Host: algsvw0058.btco.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0GoldB1 (WinNT; I)
-
- The friend declaration in a class allows the named (external) class or
- function to access private members of the declaring class. In your
- example, ABC::GetAValue() will be able to access members of XYZ.
-
- Your main routine seems to be coded as if you wanted the
- ABC::GetAValue() function to become part of the XYZ interface.
- Friend will not accomplish that.
-
- Hope this helps.
-
- Shalom Reich
-